home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / shadez.swf / scripts / Local / Game / Thing / CAircraft.as next >
Encoding:
Text File  |  2011-08-19  |  1.3 KB  |  53 lines

  1. package Local.Game.Thing
  2. {
  3.    import Local.Game.World.CAngle;
  4.    import Local.Game.World.CPosition;
  5.    import Local.Math.CRandom;
  6.    
  7.    public class CAircraft extends CThingSprite
  8.    {
  9.        
  10.       
  11.       internal var mNode:CNode;
  12.       
  13.       public function CAircraft(param1:CPosition)
  14.       {
  15.          super();
  16.          mBaseType = "aircraft";
  17.          mAngle = new CAngle();
  18.          mPosition = param1;
  19.          mDelta = new CPosition();
  20.          mRandom = new CRandom(nID);
  21.          zDepth = 110;
  22.          mMaxLife = mLife = 500;
  23.          mTargetAirbourne = true;
  24.          mShowOnMap = true;
  25.          MapAdd();
  26.       }
  27.       
  28.       override public function AffectByExplosion(param1:CThingAffect) : Boolean
  29.       {
  30.          if(super.AffectByExplosion(param1))
  31.          {
  32.             Explode();
  33.             AddSound("vehicle_explosion",Vehicle_Explosion_2);
  34.             PlaySound("vehicle_explosion");
  35.             return true;
  36.          }
  37.          return false;
  38.       }
  39.       
  40.       override public function AffectByBullet(param1:CThingAffect) : Boolean
  41.       {
  42.          if(super.AffectByBullet(param1))
  43.          {
  44.             Explode();
  45.             AddSound("vehicle_explosion",Vehicle_Explosion_2);
  46.             PlaySound("vehicle_explosion");
  47.             return true;
  48.          }
  49.          return false;
  50.       }
  51.    }
  52. }
  53.